<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台（PHP版）
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
// | 开源版本可自由商用，可去除界面版权logo
// | gitee下载：https://gitee.com/likeshop_gitee/likeadmin
// | github下载：https://github.com/likeshop-github/likeadmin
// | 访问官网：https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------

namespace app\api\validate;

use app\common\validate\BaseValidate;

/**
 * 支付/转账验证器
 * Class PaymentValidate
 * @package app\api\validate
 */
class RefundValidate extends BaseValidate
{
    protected $rule = [
//        'id' => 'require|number',
//        'payment_date' => 'require|date',
//        'currency' => 'require|max:20',
        'order_amount' => 'require|float|gt:0',
        'refund_account' => 'require|max:255',

//        'remarks' => 'max:255',
        'pay_way' => 'in:4,5',
//        'files' => 'max:255',
    ];

    protected $message = [
        'order_amount.require' => '打款金额不能为空',
        'order_amount.float' => '打款金额必须为数字',
        'order_amount.gt' => '打款金额必须大于0',
        'refund_account.require' => '打款账户不能为空',
        'pay_way.in' => '支付方式不正确',
    ];

    /**
     * @notes 创建打款记录场景
     * @return PaymentValidate
     * @author dev
     * @date 2024/03/31 11:20
     */
    public function sceneCreate()
    {
        return $this->only([ 'order_amount', 'refund_account','pay_way']);
    }




} 